package com.ly.heart.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 金蝶-不良品处理单分录信息（物料信息）对象 erp_king_bad_handle_material_info
 *
 * @author cxl
 * @date 2024-08-11
 */
@TableName ("erp_king_bad_handle_material_info")
@ApiModel (value = "金蝶-不良品处理单分录信息（物料信息）", description = "金蝶-不良品处理单分录信息（物料信息）")
@Data
@Accessors(chain = true)
public class KingBadHandleMaterialEntity{

    /** 主键id */
    @TableId (type = IdType.INPUT)
    private String id;

    /** 不良品处理单主表id */
    @ApiModelProperty ("不良品处理单主表id")
    @TableField ("bad_handle_id")
    @Excel (name = "不良品处理单主表id")
    private String badHandleId;

    /** 关联id(检验单id)*/
    @ApiModelProperty ("关联id(检验单id)")
    @TableField ("relation_id")
    @Excel (name = "关联id(检验单id)")
    private String relationId;

    /** 关联订单code(检验单code) */
    @ApiModelProperty ("关联订单code(检验单code)")
    @TableField ("relation_code")
    @Excel (name = "关联订单code(检验单code)")
    private String relationCode;

    /** 源单物料明细id */
    @ApiModelProperty ("源单物料明细id")
    @TableField ("source_material_detail_id")
    @Excel (name = "源单物料明细id")
    private String sourceMaterialDetailId;

    /** 批号 */
    @ApiModelProperty ("批号")
    @TableField ("batch_num")
    @Excel (name = "批号")
    private String batchNum;

    /** 行号 */
    @ApiModelProperty ("行号")
    @TableField ("line_number")
    @Excel (name = "行号")
    private String lineNumber;

    /** 物料id */
    @ApiModelProperty ("物料id")
    @TableField ("material_id")
    @Excel (name = "物料id")
    private String materialId;

    /** 物料编码 */
    @ApiModelProperty ("物料编码")
    @TableField ("material_code")
    @Excel (name = "物料编码")
    private String materialCode;

    /** 物料名称 */
    @ApiModelProperty ("物料名称")
    @TableField ("material_name")
    @Excel (name = "物料名称")
    private String materialName;

    /** 规格型号 */
    @ApiModelProperty ("规格型号")
    @TableField ("material_model")
    @Excel (name = "规格型号")
    private String materialModel;

    /** 供应商id */
    @ApiModelProperty ("供应商id")
    @TableField ("supplier_id")
    @Excel (name = "供应商id")
    private String supplierId;

    /** 供应商code */
    @ApiModelProperty ("供应商code")
    @TableField ("supplier_code")
    @Excel (name = "供应商code")
    private String supplierCode;

    /** 客户id */
    @ApiModelProperty ("客户id")
    @TableField ("customer_id")
    @Excel (name = "客户id")
    private String customerId;

    /** 客户code */
    @ApiModelProperty ("客户code")
    @TableField ("customer_code")
    @Excel (name = "客户code")
    private String customerCode;

    /** 单位 */
    @ApiModelProperty ("单位")
    @TableField ("unit")
    @Excel (name = "单位")
    private String unit;

    /** 生产车间 */
    @ApiModelProperty ("生产车间")
    @TableField ("workshop")
    @Excel (name = "生产车间")
    private String workshop;

    /** 检验单使用决策 */
    @ApiModelProperty ("检验单使用决策")
    @TableField ("use_decision")
    @Excel (name = "检验单使用决策")
    private String useDecision;

    /** 工序号 */
    @ApiModelProperty ("工序号")
    @TableField ("process_num")
    @Excel (name = "工序号")
    private String processNum;

    /** 检验不良数量 */
    @ApiModelProperty ("检验不良数量")
    @TableField ("check_bad_num")
    @Excel (name = "检验不良数量")
    private String checkBadNum;

    /** 工序说明 */
    @ApiModelProperty ("工序说明")
    @TableField ("process_desc")
    @Excel (name = "工序说明")
    private String processDesc;

    /** 序列号 */
    @ApiModelProperty ("序列号")
    @TableField ("serial_num")
    @Excel (name = "序列号")
    private String serialNum;

    /** 不良处理 */
    @ApiModelProperty ("不良处理")
    @TableField ("bad_handle")
    @Excel (name = "不良处理")
    private String badHandle;

    /** 不良数量 */
    @ApiModelProperty ("不良数量")
    @TableField ("bad_num")
    @Excel (name = "不良数量")
    private String badNum;

    /** mrb评审 */
    @ApiModelProperty ("mrb评审")
    @TableField ("is_mrb")
    @Excel (name = "mrb评审")
    private Boolean isMrb;

    /** 是否折让 */
    @ApiModelProperty ("是否折让")
    @TableField ("is_discount")
    @Excel (name = "是否折让")
    private Boolean isDiscount;

    /** 折让金额 */
    @ApiModelProperty ("折让金额")
    @TableField ("discount_amount")
    @Excel (name = "折让金额")
    private String discountAmount;

    /** 录入人 */
    @ApiModelProperty ("录入人")
    @TableField ("user_id")
    @Excel (name = "录入人")
    private String userId;

    /** 创建时间 */
    @ApiModelProperty ("创建时间")
    @TableField ("create_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    /** 更新时间 */
    @ApiModelProperty ("更新时间")
    @TableField ("change_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    /** 逻辑删除 */
    @ApiModelProperty ("逻辑删除")
    @TableField ("is_used")
    @Excel (name = "逻辑删除")
    @TableLogic
    private Integer isUsed;

    /** 仓库id */
    @ApiModelProperty ("仓库id")
    @TableField ("warehouse_id")
    @Excel (name = "仓库id")
    private String warehouseId;

    /** 仓库编码 */
    @ApiModelProperty ("仓库编码")
    @TableField ("warehouse_code")
    @Excel (name = "仓库编码")
    private String warehouseCode;

    /** 仓位 */
    @ApiModelProperty ("仓位")
    @TableField ("warehouse_position")
    @Excel (name = "仓位")
    private String warehousePosition;

    @ApiModelProperty("物料明细分录信息")
    @TableField(exist = false)
    private KingBadHandleMaterialDetailEntity materialDetail;

}
